package com.le.tester.onjava8.l_2_1;

/**
 * createTime：2023/1/6 9:40
 * description：
 */
public class Aliasl {

    private int i;

    public Aliasl(int i) {
        this.i = i;
    }

    public static void main(String[] args) {
        Aliasl x = new Aliasl(7);
        //引用的直接赋值
        Aliasl y = x;
        System.out.println("x: " + x.i);
        System.out.println("y: " + y.i);
        System.out.println("increment x");
        x.i++;
        System.out.println("x: " + x.i);
        System.out.println("y: " + y.i);
    }
}
